/*
 *
 *
 *
 *
 */

package com.usefullc.system.domain;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.usefullc.system.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;

/**
 * 应用版本项
 * @author admin
 *
 * @2022-05-14
 */
@JsonIgnoreProperties(value = {"appVersion","delState"})
@ApiModel
@Entity(name="sys_app_version_item")
@Table
@Data
public class AppVersionItem extends BaseEntity {

    @ApiModelProperty(notes = "主版本ID")
    @Column(length = 50,nullable = false)
    private Long appVersionId;

    @ApiModelProperty(notes = "类型（android,ios,win,darwin,linux）")
    @Column(length = 50,nullable = false)
    private String platform;

    @ApiModelProperty(notes = "平台版本（win-x32,win-x64,mac-x64,mac-arm64,linux）")
    @Column(length = 50,nullable = false)
    private String platformVersion;


    @ApiModelProperty(notes = "app下载链接地址")
    @Column(length = 50,nullable = false)
    private String appUrl;


    @ManyToOne(cascade = {CascadeType.REFRESH},  optional = false)
    @JoinColumn(name = "appVersionId", nullable = false, insertable = false, updatable = false)
    private AppVersion appVersion;

    public AppVersionItem(){
    }

}
